
import home_list1 from './datas/mosushop/home_list1.json'
import home_list2 from './datas/mosushop/home_list2.json'
import home_list3 from './datas/mosushop/home_list3.json'
import home_list4 from './datas/mosushop/home_list4.json'
import activity_list1 from './datas/mosushop/activity_list1.json'
import activity_list2 from './datas/mosushop/activity_list2.json'
import activity_list3 from './datas/mosushop/activity_list3.json'
import activity_list4 from './datas/mosushop/activity_list4.json'
import coupon_item_list1 from './datas/mosushop/coupon_item_list1.json'
import coupon_item_list2 from './datas/mosushop/coupon_item_list2.json'

export default {
    namespaced: true,
    state: {
        homeList1: home_list1,
        homeList2: home_list2,
        homeList3: home_list3,
        homeList4: home_list4,
        activityList: [],
        couponItemList: []
    },
    mutations: {
        setActivityList (state, activityList) {
            state.activityList = activityList
        },
        setCouponItemList (state, couponItemList) {
            state.couponItemList = couponItemList
        }
    },
    actions: {
        getActivityListAction ({ commit }, tab) {
            if (tab === 0) {
                commit('setActivityList', activity_list1)
            } else if (tab === 1) {
                commit('setActivityList', activity_list2)
            } else if (tab === 2) {
                commit('setActivityList', activity_list3)
            } else {
                commit('setActivityList', activity_list4)
            }
        },
        getCouponItemListAction ({ commit }, tab) {
            if (tab === 0) {
                commit('setCouponItemList', coupon_item_list1)
            } else if (tab === 1) {
                commit('setCouponItemList', coupon_item_list2)
            }
        }
    }
}